#include<iostream>
#include<unordered_map>
# include <list>
# include <vector>
#include<iterator>
#include<ext/malloc_allocator.h>
#include<ext/new_allocator.h>
#include <typeinfo>
using namespace std;

template<typename T> void fuzhi(T &t1,T&&  t2){
    cout << "模板优先"<<endl;
    t1 = t2;
};
void fuzhi(list<int> &t1,list<int> &&  t2){
    cout << "函数优先"<<endl;
    t1 = t2;
};

bool predicate(int  t){
    cout<<t<<","<<(t>=0)<<endl;
    return t >= 0;
}
int main(){
   
    list<int> mlist;
    mlist.push_back(-1);
    mlist.push_back(-2);
    mlist.push_back(-3);
    mlist.push_back(1);
    mlist.push_back(2);
    mlist.emplace_front(12);
      cout<<"hello"<<endl;
    for(list<int>::iterator it = mlist.begin();it!=mlist.end();it++){
       cout<<*it<<endl;
    }
    cout<<"hello"<<endl;

    list<int> mlist2(4,13);
    // mlist.remove_if(predicate);
    mlist2.splice(mlist2.end(),mlist,mlist.begin());

    cout<<"hello"<<endl;
    for(list<int>::iterator it = mlist2.begin();it!=mlist2.end();it++){
       cout<<*it<<endl;
    }
    cout<<"hello"<<endl;
    cout<<"hello"<<endl;
    for(list<int>::iterator it = mlist.begin();it!=mlist.end();it++){
       cout<<*it<<endl;
    }
    cout<<"hello"<<endl;
  
    return 0;
}